Hello,
I want to create 2 textboxes next to each other. The simple placement "beside" doesn't do anything.
The following code doesn't work aswell, because the first textbox will not be shown.
What can I do?
Best regards itnoc
itnoc - Wed Sep 02 10:41:59 EDT 2015 |
Re: Textboxes next to each other ( You should try to explicitly define the 4 borders behavior ...
void doclose(DB x){ hide x; destroy x }
DB db = create("heading", styleCentered)
DBE textbox1 = text(db,"Target:","",250,300,true)
DBE textbox2 = text(db,"Source:","",250,300,true)
close(db, false, doclose)
textbox1->"top"->"form"
textbox1->"left"->"form"
textbox1->"bottom"->"form"
textbox1->"right"->"unattached"
textbox2->"top"->"aligned"->textbox1
textbox2->"left"->"unattached"
textbox2->"bottom"->"form"
textbox2->"right"->"form"
show db
Enjoy ! ) |
Re: Textboxes next to each other Apart from a small mistake (textbox2 left spaced to textbox1 missing) this works perfectly, thanks a lot. However if I try it with rich text boxes, it looks odd, because they're not on the same height. Someone knows how to fix this?
Edit: Figured it out now, textbox2 shouldn't be aligned but attached to form on the top. Then it works perfectly:
|
Re: Textboxes next to each other I had some trouble in this area aligning "text" boxes but I cannot find my notes. I suppose attaching the top to the "form" works, but otherwise you need to attach the 2nd one to some other DBE and not to the previous text box.
Note the 2nd empty label "r" provides a fluent bottom to the two boxes, so you can see the bottom "apply" and "close" buttons. Additional DBEs can be attached to that. -Louie |